CPU 686
BITS 32

%define EOI 20h
%define PIC1_CMD 20h
global _time_tick
global _mili_tick
global _sec_tick
global _program

section .data
_mili_tick dd 0
_sec_tick dd 0
freq dd 1000

section .text
_program:
	push eax;
	inc dword[_mili_tick]
	dec dword[freq]
	
	jnz fim
	inc dword[_sec_tick]
	mov dword[freq], 1000
	
fim:  
	mov al, EOI
	out PIC1_CMD, al
	
	pop eax
	iretd
END

